package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
import java.util.Map;

public class Order {
    private String id;

    private String orderNum;

    private String itemTypeId;

    private String productName;

    private String gradeValue;

    private String thNumber;

    private String peieceNum;

    private String totalNum;

    private String price;

    private String totalPrice;

    private String goodsDay;

    private String remark;

    private String status;

    private Date createTime;

    private Date updateTime;

    private String createUserId;

    private String createUserName;

    private String orderType;

    private String customer;

    private String orderStatus;

    private String sureUserName;

    private String sureTime;

    private int count;

    //是否发货 0 未发货 1 已经发货
    private String goodsStatus;
    //是否有计划
    private String productPlan ;
    //已发库存
    private String sendGoodsCount;
    //需求下发人
    private String sendNeedsUser;
    //需求下时间
    private String sendNeedsTime;
    private String orderOutTime;
    private String orderOutCode;
    private String orderCount;

    //总库存
    private int storageCount;

    //发货数量
    private int storageOutProductCount = 0;



    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum == null ? null : orderNum.trim();
    }

    public String getItemTypeId() {
        return itemTypeId;
    }

    public void setItemTypeId(String itemTypeId) {
        this.itemTypeId = itemTypeId == null ? null : itemTypeId.trim();
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName == null ? null : productName.trim();
    }

    public String getGradeValue() {
        return gradeValue;
    }

    public void setGradeValue(String gradeValue) {
        this.gradeValue = gradeValue == null ? null : gradeValue.trim();
    }

    public String getThNumber() {
        return thNumber;
    }

    public void setThNumber(String thNumber) {
        this.thNumber = thNumber == null ? null : thNumber.trim();
    }

    public String getPeieceNum() {
        return peieceNum;
    }

    public void setPeieceNum(String peieceNum) {
        this.peieceNum = peieceNum == null ? null : peieceNum.trim();
    }

    public String getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(String totalNum) {
        this.totalNum = totalNum == null ? null : totalNum.trim();
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price == null ? null : price.trim();
    }

    public String getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(String totalPrice) {
        this.totalPrice = totalPrice == null ? null : totalPrice.trim();
    }

    public String getGoodsDay() {
        return goodsDay;
    }

    public void setGoodsDay(String goodsDay) {
        this.goodsDay = goodsDay == null ? null : goodsDay.trim();
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId == null ? null : createUserId.trim();
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName == null ? null : createUserName.trim();
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType == null ? null : orderType.trim();
    }

    public String getCustomer() {
        return customer;
    }

    public void setCustomer(String customer) {
        this.customer = customer == null ? null : customer.trim();
    }

    public String getOrderStatusCn() {
        if(StringUtils.equals(getOrderStatus(),"1")){
            return "待确认";
        }else if(StringUtils.equals(getOrderStatus(),"2")){
            return "无";
        }else if(StringUtils.equals(getOrderStatus(),"3")){
            return "待排产";
        }else if(StringUtils.equals(getOrderStatus(),"4")){
            return "待生产";
        }else if(StringUtils.equals(getOrderStatus(),"5")){
            return "生产中";
        } else if(StringUtils.equals(getOrderStatus(),"6")){
            return "生产完成";
        } else if(StringUtils.equals(getOrderStatus(),"7")){
            return "执行中";
        }else if(StringUtils.equals(getOrderStatus(),"8")){
            return "已完成";
        }else if(StringUtils.equals(getOrderStatus(),"9")){
            return "已取消";
        }
        return "";
    }
    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus == null ? null : orderStatus.trim();
    }

    public String getSureUserName() {
        return sureUserName;
    }

    public void setSureUserName(String sureUserName) {
        this.sureUserName = sureUserName == null ? null : sureUserName.trim();
    }

    public String getSureTime() {
        return sureTime;
    }

    public void setSureTime(String sureTime) {
        this.sureTime = sureTime == null ? null : sureTime.trim();
    }


    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }


    public String getGoodsStatus() {
        return goodsStatus;
    }

    public void setGoodsStatus(String goodsStatus) {
        this.goodsStatus = goodsStatus;
    }

    public String getProductPlan() {
        return productPlan;
    }

    public void setProductPlan(String productPlan) {
        this.productPlan = productPlan;
    }

    public String getSendGoodsCount() {
        return sendGoodsCount;
    }

    public void setSendGoodsCount(String sendGoodsCount) {
        this.sendGoodsCount = sendGoodsCount;
    }

    public int getStorageCount() {
        return storageCount;
    }

    public void setStorageCount(int storageCount) {
        this.storageCount = storageCount;
    }

    public String getSendNeedsUser() {
        return sendNeedsUser;
    }

    public void setSendNeedsUser(String sendNeedsUser) {
        this.sendNeedsUser = sendNeedsUser;
    }

    public String getSendNeedsTime() {
        return sendNeedsTime;
    }

    public void setSendNeedsTime(String sendNeedsTime) {
        this.sendNeedsTime = sendNeedsTime;
    }

    public int getStorageOutProductCount() {
        return storageOutProductCount;
    }

    public void setStorageOutProductCount(int storageOutProductCount) {
        this.storageOutProductCount = storageOutProductCount;
    }


    public String getCreateTimeFt() {
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd");
        return formatTime;
    }

    public String getOrderOutTime() {
        return orderOutTime;
    }

    public void setOrderOutTime(String orderOutTime) {
        this.orderOutTime = orderOutTime;
    }

    public String getOrderOutCode() {
        return orderOutCode;
    }

    public void setOrderOutCode(String orderOutCode) {
        this.orderOutCode = orderOutCode;
    }

    public String getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(String orderCount) {
        this.orderCount = orderCount;
    }
}